# !/usr/bin/python3
# -*- coding: utf-8 -*-

"""
字典数据表模型类
----------------------------------------------------
@Project :   xinhou-openai-framework
@File    :   DictsData.py
@Contact :   sp_hrz@qq.com

@Modify Time      @Author    @Version    @Desciption
------------      -------    --------    -----------
2023/04/16 22:04  peng.shen   v1.0.0     None
"""

from datetime import datetime
from typing import Optional

from pydantic import BaseModel, Field


class ReqDictsDataFindSchema(BaseModel):
    """
    字典数据表参数&校验模型
    """

    id: Optional[int] = Field(
        default=None, title="主键ID",
    )

    dict_sort: Optional[int] = Field(
        default=None, title="字典排序"
    )

    dict_label: Optional[str] = Field(
        default=None, title="字典标签",
    )

    dict_value: Optional[str] = Field(
        default=None, title="字典键值",
    )

    dict_number: Optional[int] = Field(
        default=None, title="字典值",
    )

    dict_type: Optional[str] = Field(
        default=None, title="字典类型",
    )

    dict_value_type: Optional[int] = Field(
        default=None, title="字典值类型",
    )

    css_class: Optional[str] = Field(
        default=None, title="样式属性&其他样式扩展",
    )

    list_class: Optional[str] = Field(
        default=None, title="表格回显样式",
    )

    is_default: Optional[int] = Field(
        default=None, title="是否默认:1=是,0=否",
    )

    status: Optional[int] = Field(
        default=None, title="状态:1=正常,2=停用",
    )

    create_by: Optional[str] = Field(
        default=None, title="创建者",
    )

    created_at: Optional[datetime] = Field(
        default=None, title="创建时间",
    )

    update_by: Optional[str] = Field(
        default=None, title="更新者",
    )

    updated_at: Optional[datetime] = Field(
        default=None, title="更新时间",
    )

    remark: Optional[str] = Field(
        default=None, title="备注",
    )


class ReqDictsDataSaveSchema(BaseModel):
    """
    字典数据表参数&校验模型
    """

    dict_sort: Optional[int] = Field(
        title="字典排序", default='0',
    )

    dict_label: Optional[str] = Field(
        title="字典标签",
    )

    dict_value: Optional[str] = Field(
        title="字典键值",
    )

    dict_number: Optional[int] = Field(
        title="字典值", default='0',
    )

    dict_type: Optional[str] = Field(
        title="字典类型",
    )

    dict_value_type: Optional[int] = Field(
        title="字典值类型", default='1',
    )

    css_class: Optional[str] = Field(
        title="样式属性&其他样式扩展",
    )

    list_class: Optional[str] = Field(
        title="表格回显样式",
    )

    is_default: Optional[int] = Field(
        title="是否默认:1=是,0=否", default='1',
    )

    status: Optional[int] = Field(
        title="状态:1=正常,2=停用", default='1',
    )

    create_by: Optional[str] = Field(
        default=None, title="创建者",
    )

    created_at: Optional[datetime] = Field(
        default=None, title="创建时间",
    )

    update_by: Optional[str] = Field(
        default=None, title="更新者",
    )

    updated_at: Optional[datetime] = Field(
        default=None, title="更新时间",
    )

    remark: Optional[str] = Field(
        default=None, title="备注",
    )


class ReqDictsDataUpdateSchema(BaseModel):
    """
    字典数据表参数&校验模型
    """

    id: int = Field(
        title="主键ID",
    )

    dict_sort: Optional[int] = Field(
        default=None, title="字典排序",
    )

    dict_label: Optional[str] = Field(
        default=None, title="字典标签",
    )

    dict_value: Optional[str] = Field(
        default=None, title="字典键值",
    )

    dict_number: Optional[int] = Field(
        default=None, title="字典值",
    )

    dict_type: Optional[str] = Field(
        default=None, title="字典类型",
    )

    dict_value_type: Optional[int] = Field(
        default=None, title="字典值类型",
    )

    css_class: Optional[str] = Field(
        default=None, title="样式属性&其他样式扩展",
    )

    list_class: Optional[str] = Field(
        default=None, title="表格回显样式",
    )

    is_default: Optional[int] = Field(
        default=None, title="是否默认:1=是,0=否",
    )

    status: Optional[int] = Field(
        default=None, title="状态:1=正常,2=停用",
    )

    create_by: Optional[str] = Field(
        default=None, title="创建者",
    )

    created_at: Optional[datetime] = Field(
        default=None, title="创建时间",
    )

    update_by: Optional[str] = Field(
        default=None, title="更新者",
    )

    updated_at: Optional[datetime] = Field(
        default=None, title="更新时间",
    )

    remark: Optional[str] = Field(
        default=None, title="备注",
    )


class ResDictsDataDetailSchema(BaseModel):
    """
    字典数据表参数&校验模型
    """

    id: Optional[int] = Field(
        default=None, title="主键ID",
    )

    dict_sort: Optional[int] = Field(
        default=None, title="字典排序",
    )

    dict_label: Optional[str] = Field(
        default=None, title="字典标签",
    )

    dict_value: Optional[str] = Field(
        default=None, title="字典键值",
    )

    dict_number: Optional[int] = Field(
        default=None, title="字典值",
    )

    dict_type: Optional[str] = Field(
        default=None, title="字典类型",
    )

    dict_value_type: Optional[int] = Field(
        default=None, title="字典值类型",
    )

    css_class: Optional[str] = Field(
        default=None, title="样式属性&其他样式扩展",
    )

    list_class: Optional[str] = Field(
        default=None, title="表格回显样式",
    )

    is_default: Optional[int] = Field(
        default=None, title="是否默认:1=是,0=否",
    )

    status: Optional[int] = Field(
        default=None, title="状态:1=正常,2=停用",
    )

    create_by: Optional[str] = Field(
        default=None, title="创建者",
    )

    created_at: Optional[datetime] = Field(
        default=None, title="创建时间",
    )

    update_by: Optional[str] = Field(
        default=None, title="更新者",
    )

    updated_at: Optional[datetime] = Field(
        default=None, title="更新时间",
    )

    remark: Optional[str] = Field(
        default=None, title="备注",
    )
